home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cartopedia - The Ultimate World Reference Atlas
/
Cartopedia_World_ Reference_CD.ISO
/
dksetup
/
dkgen.bak
< prev
next >
Wrap
Text File
|
1996-06-21
|
25KB
|
701 lines
'01/06/95 No choice about adding icons to progman
'?/05/95 If bundle with sampler need to test for cirrus driver - put into mst file
'12/03/95 Alternative function added, readme icon has shortened name
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
'$INCLUDE 'dklang.inc'
CONST SOURCE_BINARIES_SUBDIR = "DKCODE"
CONST SOURCE_SETUP_SUBDIR = "DKSETUP"
CONST SETUP_INF_FILENAME = "SETUP.INF"
CONST CUIDLL_FILENAME = "mscuistf.dll"
CONST SETUP_INI_BINARIES_SECTION_NAME = "BIN"
CONST SETUP_INI_WING_BINARIES_NAME = "WinG Runtime"
CONST SETUP_INI_WING32_BINARIES_NAME = "WinG32"
CONST SETUP_INI_ACM_SECTION_NAME = "ACM Drivers"
CONST SETUP_INI_FONTS_SECTION_NAME = "Fonts"
CONST PRODUCT_INI_DIR_SECTION_NAME = "Directory"
CONST PRODUCT_INI_DIR_ENTRY_NAME = "Data"
CONST MINIMUM_DISK_SPACE = 2048 ' For Minimum install
' Procs
CONST PROC_HELP = "FHelpDlgProc"
DECLARE FUNCTION ExitWindowsExec LIB "USER.EXE" (szEXE$, szParams$) AS INTEGER
DECLARE FUNCTION Ctl3dRegister LIB "CTL3D.DLL" (hInst%) AS INTEGER
DECLARE FUNCTION Ctl3dUnregister LIB "CTL3D.DLL" (hInst%) AS INTEGER
DECLARE FUNCTION Ctl3dAutoSubClass LIB "CTL3D.DLL" (hInst%) AS INTEGER
DECLARE FUNCTION OnWin3x LIB "setuphlp.DLL" AS INTEGER
DECLARE FUNCTION VflatdPresent LIB "setuphlp.DLL" AS INTEGER
DECLARE FUNCTION GetRealSystemDir LIB "setuphlp.DLL" (szDir$,cbBuf%) AS INTEGER
DECLARE FUNCTION RestartWindows LIB "setuphlp.DLL" AS INTEGER
DECLARE FUNCTION IsWin32FileNewer LIB "setuphlp.DLL" (szOrig$,szNew$) AS INTEGER
DECLARE SUB RenameFilePlease LIB "setuphlp.DLL" (szOrig$,szNew$)
DECLARE FUNCTION FIsVGA LIB "mscuistf.dll" AS INTEGER
DECLARE FUNCTION FIs256Colour LIB "mscuistf.dll" AS INTEGER
DECLARE FUNCTION Welcome() AS INTEGER
DECLARE FUNCTION TestSystem() AS INTEGER
DECLARE FUNCTION GetDiskSpaceNeeded(drive%) AS LONG
DECLARE SUB Initialise(prodName$, defInstallPath$, msgCaption$)
DECLARE SUB DeInitialise()
DECLARE SUB AskQuit()
DECLARE SUB BadPath()
DECLARE SUB NetworkDrive()
DECLARE SUB UpdateIndeoAVIDrivers()
DECLARE SUB UpdateWinGDrivers()
DECLARE SUB UpdateADPCMDrivers()
'DECLARE SUB UpdateProgramManager(prodName$, appExeFile$, appPengeFile$, readmeFile$, readmeStr$, onCDROM%)
'DECLARE SUB UpdateProgramManagerAlt(prodName$, readmeName$, appExeFile$, appPengeFile$, readmeFile$, readmeStr$, onCDROM%)
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION GetRealWindowsSysDir AS STRING
DECLARE SUB UpdateWinG32 (szOrig$)
DECLARE SUB HandleRestart()
DECLARE SUB InitCommonInstall()
DECLARE SUB EndCommonInstall(appReadmeFile$, inRoot%, szEditorExe$)
' Error messages
CONST ERR_OK = 100
CONST ERR_EXITFAIL = 101
CONST ERR_WINVERFAIL = 102
CONST ERR_NODISKSPACE = 103
' Navigation messages
CONST NAV_FORWARD = 0
CONST NAV_BACK = 1
' Bitmap ID
CONST LOGO = 1
'QUIT ASKQUIT
'ABORT EXITFAILURE
'BADEXIT EXITQUIT
'SUCCES EXITSUCCESS
'WELHELP APPHELP
'DONEVIDEO DONENEWSYSSOFT
'DONENOVIDEO DONENOSYSSOFT
'ADDSYSTEMSOFTWARE NEWSYSTEMSOFTWARE
'WRONGADPCM NEWADPCM
'NOSYSSOFTWARE WARNNOSYSSOFT
' Dialog ID's
CONST IDD_WELCOME = 100
CONST IDD_CUSTOMHELP = 106
CONST IDD_SPEED = 111
CONST IDD_ASKQUIT = 200
CONST IDD_DESTPATH = 300
CONST IDD_EXITFAILURE = 400
CONST IDD_EXITQUIT = 600
CONST IDD_EXITSUCCESS = 700
CONST IDD_APPHELP = 900
CONST IDD_DONENEWSYSSOFT = 1100
CONST IDD_DONENOSYSSOFT = 1800
CONST IDD_NEWSYSTEMSOFTWARE = 2300
CONST IDD_NEWADPCM = 2600
CONST IDD_WARNNOSYSSOFT = 3100
CONST IDD_MAILMAN = 1500
CONST IDD_CUSTOM = 6200
CONST IDD_BADPATH = 6400
CONST IDD_NEED31 = 6401
CONST IDD_NOMOUSE = 6402
CONST IDD_BADVGA = 6403
CONST IDD_NOT256 = 6404
CONST IDD_POORMACHINE = 6405
CONST IDD_AWFULMACHINE = 6406
CONST IDD_PATHHELP = 6407
CONST IDD_WHIZZHELP = 6408
CONST IDD_URKADPCM = 6409
CONST IDD_ADPCMHELP = 6410
CONST IDD_NODISKSPACE = 6411
CONST IDD_NETWORKDRIVE = 6412
GLOBAL szWinPath As String
GLOBAL szWinSysPath As String
GLOBAL szWinDrive As String
GLOBAL szSrcSetupPath As String
GLOBAL szSrcBinPath As String
GLOBAL szDestPath As String
GLOBAL szOldDestPath As String
GLOBAL szPengePath As String
GLOBAL szINFPath As String
GLOBAL szAppINIPath As String
GLOBAL szMsgCaption As String
GLOBAL szButton As String
GLOBAL szMinimalInstall As String
GLOBAL szAddPMItem As String
GLOBAL szExpressCustomChoice As String
GLOBAL fPreviousMode As Integer
GLOBAL fWillNotFit As Integer
GLOBAL fSystemUpdated As Integer
GLOBAL hDlg As Integer
GLOBAL dButton As Integer
GLOBAL dWinDrive As Integer
GLOBAL dDestDrive As Integer
GLOBAL dCursor As Integer
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub InitCommonInstall() STATIC
AddToBillboardList CUIDLL_FILENAME, IDD_MAILMAN, "MailmanDlgProc", 2500
SetCopyGaugePosition -1, 150
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub EndCommonInstall(appReadmeFile$, inRoot%, szEditorExe$) STATIC
if RestartListEmpty = 0 or fSystemUpdated = 1 then
hDlg = IDD_DONENEWSYSSOFT
else
hDlg = IDD_DONENOSYSSOFT
end if
QuitLoop:
szButton = UIStartDlg(CUIDLL_FILENAME, hDlg, "FInfoDlgProc", 0, "")
select case szButton
case "REACTIVATE"
goto QuitLoop
case "CONTINUE" 'Read me
if inRoot% = 1 then
szReadMe$ = MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), appReadmeFile$)
else
szReadMe$ = MakePath(szSrcBinPath, appReadmeFile$)
end if
run szEditorExe$ + szReadMe$,NOWAIT , SW_MAXIMIZE
goto QuitLoop
case "BACK" 'Restart Windows
HandleRestart
case "EXIT" 'Return to Windows
if hDlg = IDD_DONENEWSYSSOFT then
dButton = DoMsgBox( STR_SYSMESSAGE, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONHAND)
end if
end select
UIPop 1
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Initialise(prodName$, defInstallPath$, msgCaption$) STATIC
ret% = Ctl3dRegister(HinstFrame())
ret% = Ctl3dAutoSubClass(HinstFrame())
szMsgCaption$ = msgCaption$
cursor% = ShowWaitCursor()
ClearCopyList
szWinSysPath = ucase$(GetWindowsSysDir ())
szWinPath = ucase$(GetWindowsDir ())
dWinDrive = asc(mid$((szWinPath), 1,1)) - asc("A")+1
szWinDrive = mid$(szWinPath, 1,1)
szSrcSetupPath = ucase$(GetSymbolValue ("STF_SRCDIR"))
szSrcBinPath = mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1) + SOURCE_BINARIES_SUBDIR
szDestPath = szWinDrive + ":" + defInstallPath$
SetTitle szMsgCaption$
SetBitmap CUIDLL_FILENAME, 1
SetAbout prodName$, STR_COPYRIGHT
fPreviousMode = SetBeepingMode (1)
fPreviousMode = SetDecompMode (1)
fPreviousMode = SetSilentMode (0)
szINFPath = ucase$(GetSymbolValue("STF_SRCINFPATH"))
if szINFPath = "" then
szINFPath = ucase$(GetSymbolValue("STF_CWDDIR")) + SETUP_INF_FILENAME
end if
ReadInfFile szINFPath
szExpressCustomChoice = "EXPRESS"
szMinimalInstall = "OFF"
' szAddPMItem = "ON"
fSystemUpdated = 0
RestoreCursor(cursor%)
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub DeInitialise() STATIC
ret% = Ctl3dRegister(HinstFrame())
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub AskQuit() STATIC
begin:
szButton = UIStartDlg(CUIDLL_FILENAME, IDD_ASKQUIT, "FQuitDlgProc", 0, "")
select case szButton
case "REACTIVATE"
goto begin
case "EXIT"
error STFQUIT
case "CONTINUE"
UIPop 1
end select
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''